home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / command-interface / interface-hooks.scm < prev    next >
Encoding:
Text File  |  1994-09-27  |  2.5 KB  |  80 lines  |  [TEXT/CCL2]

  1. ;;; interface-prims.scm -- low-level primitives for user interface
  2. ;;;
  3. ;;; author :  Sandra Loosemore
  4. ;;; date   :  23 Jul 1993
  5. ;;;
  6. ;;;
  7.  
  8.  
  9. ;;;=========================================================================
  10. ;;; Hooks for customizing the interface
  11. ;;;=========================================================================
  12.  
  13.  
  14. ;;; The savesys code is responsible for establishing a debugger hook
  15. ;;; function (e.g., using *debugger-hook* from the CL condition facility).
  16.  
  17. ;;; If this variable is false, don't enter the debugger at all; simply
  18. ;;; restart the command loop.
  19.  
  20. (define *haskell-debug-in-lisp* '#f)
  21.  
  22.  
  23. ;;; These two functions may be bound to functions of no arguments which
  24. ;;; perform some sort of notication to the user.  The debugger hook 
  25. ;;; function should invoke them before or after (respectively) invoking
  26. ;;; the real debugger.  The return values of the functions are ignored.
  27.  
  28. (define *haskell-enter-debugger-hook* '#f)
  29. (define *haskell-exit-debugger-hook* '#f)
  30.  
  31.  
  32. ;;; This function is called to read a line of input (without the trailing
  33. ;;; newline) from standard input.  It might want to take some sort of
  34. ;;; action to notify the user that they're supposed to type something.
  35.  
  36. (define *haskell-input-hook*
  37.   (lambda () (error "No interface installed!")))
  38.  
  39.  
  40. ;;; The command loop calls this function to read and execute a single
  41. ;;; command.  It may display prompts, menus, etc. or whatever.  The
  42. ;;; function takes no arguments and the return values are ignored.
  43.  
  44. (define *haskell-command-hook*
  45.   (lambda () (error "No interface installed!")))
  46.  
  47.  
  48. ;;; When the command loop is started (or restarted, after an error), it
  49. ;;; calls this function to perform any initialization specific to the
  50. ;;; particular user interface.  It is a function of no arguments and
  51. ;;; the return values are ignored.
  52.  
  53. (define *haskell-initialize-hook*
  54.   (lambda () (error "No interface installed!")))
  55.  
  56.  
  57. ;;; This variable may be bound to a function that is used to report a
  58. ;;; Haskell error (as opposed to an internal Lisp error).  The function
  59. ;;; is called whenever a non-recoverable error causes control to be
  60. ;;; returned to the command loop.  It takes no arguments and the return
  61. ;;; values are ignored.
  62.  
  63. (define *haskell-compilation-error-hook* '#f)
  64.  
  65. (define *compile/compile-cflags*
  66.   (make cflags
  67.     (load-code?          '#t)
  68.     (compile-code?       '#t)
  69.     (write-code?         '#t)
  70.     (write-interface?    '#t)))
  71.  
  72. (define *compile/load-cflags*
  73.   (make cflags
  74.     (load-code?          '#t)
  75.     (compile-code?       '#f)
  76.     (write-code?         '#f)
  77.     (write-interface?    '#f)))
  78.  
  79.  
  80.